# -*- coding: utf-8 -*-

def breadcrumb_from_objects(objects):
	crumb = ""
	for item in objects:
		url = ""
		text = ""

		try:
			url = item.get_absolute_url()
		except AttributeError:
			url = item["url"]

		try:
			text = item.full_title()
		except AttributeError:
			try:
				text = item.title
			except AttributeError:
				text = item["title"]

		crumb += " / <a href=\"" + url + "\">" + text + "</a>"
	
	return crumb
